package com.china.produce.manager.factory;

import com.china.produce.pojo.SysOPerLog;
import com.china.produce.service.log.SysOPerLogService;
import com.china.produce.system.util.SpringUtils;

import java.util.TimerTask;

/**
 * @ClassName
 * @Author niujie
 * @Version
 * @Description
 * @CreateTime 2023/3/18
 */
public class AsyncFactory {

    public static TimerTask recordOperation(SysOPerLog sysOPerLog)
    {
        return new TimerTask()
        {
            @Override
            public void run()
            {
                // 远程查询操作地点
                SpringUtils.getBean(SysOPerLogService.class).insertOPerLog(sysOPerLog);
            }
        };
    }
}
